<template>
  <div>
    <h1>Vue Router Demo</h1>
    <button @click=forward>前进</button>
    <button @click=back>后退</button>
    <button @click=go>测试一下go</button>
  </div>
  
</template>

<script>
export default {
  methods:{
    forward(){
      //前进
      this.$router.forward()
    },
    back(){
      //后退
      this.$router.back()
    },
    go(){
      //正数前进(2 前进两步), 负数后退(-2 后退两步)
      this.$router.go(2)
    }
  }
}
</script>

<style>

</style>